/**
 * Created by Eoly on 2016/12/31.
 */



var gameBox = document.getElementsByClassName("game-box")[0];
var playerCanvas = new ObjectCanvas(document.getElementById("playerCanvas"));
var planeCanvas = new ObjectCanvas(document.getElementById("planeCanvas"));
var bulletCanvas = new ObjectCanvas(document.getElementById("bulletCanvas"));
var infoCanvas = new ObjectCanvas(document.getElementById("infoCanvas"));




var player = new Player(playerCanvas);
var enemy;
var allObj = new Obj();


planeCanvas.allObj = allObj;
playerCanvas.allObj = allObj;
bulletCanvas.allObj = allObj;


player.bulletCanvas = bulletCanvas;


player.startGame();
bulletCanvas.startDraw();
planeCanvas.startDraw();
planeCanvas.startCheckStrike();

(function () {
    var width = window.innerWidth;
    if(width>768){
        document.getElementById("ewm").style.display = "block";
        player.overGameAll();
    }

})();
